package demo.game.chess.common;

/**
 * Information used for updating UI board.
 * 
 * @author Prawee Sriplakich
 *
 */
public class BoardChange {
	public static enum EnumChangeType {
		add, remove
	}

	private final AbstractChessPiece piece;

	private final ChessCell cell;

	private final EnumChangeType changeType;

	public BoardChange(final EnumChangeType changeType, final ChessCell cell,
			final AbstractChessPiece piece) {
		super();
		this.changeType = changeType;
		this.cell = cell;
		this.piece = piece;
	}

	public ChessCell getCell() {
		return this.cell;
	}

	public EnumChangeType getChangeType() {
		return this.changeType;
	}

	public AbstractChessPiece getPiece() {
		return this.piece;
	}

	@Override
	public String toString() {
		return this.changeType + " " + this.piece + " at " + this.cell;
	}

}
